﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Castle.ActiveRecord;
using System.ComponentModel.DataAnnotations;

namespace CQIE.OVS.Model
{
    public class EntityBase
    {
        [PrimaryKey(PrimaryKeyType.Identity)]//主键的类型为自增型
        [Display(AutoGenerateField = false)]//在生成视图时不生成本属性
        public virtual int ID { get; set; }//主键

    }

    /// <summary>
    /// 查询条件
    /// </summary>
    public class QueryConditions
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="PropertyName">属性名</param>
        /// <param name="Operator">操作符号：= > < >= <= != isEmpty like等</param>
        /// <param name="Value">属性值</param>
        public QueryConditions(string PropertyName, string Operator, object Value)
        {
            this.PropertyName = PropertyName;
            this.Operator = Operator;
            this.Value = Value;
        }

        /// <summary>
        /// 属性名
        /// </summary>
        public string PropertyName { get; set; }

        /// <summary>
        /// 操作符号：= > < >= <= != isEmpty like等 
        /// </summary>
        public string Operator { get; set; }

        /// <summary>
        /// 属性值
        /// </summary>
        public object Value { get; set; }
    }

}
